home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 56 / 056.d81 / castle of spirit (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  213 lines

  1. 1 print"[147]":gosub2000:clr
  2. 10 poke53280,0:poke53281,0:m=0:rm=1:printchr$(147);chr$(14);chr$(30):z=1
  3. 20 nr=10:nv=22:nn=14:no=7
  4. 25 dimmp(nr,7),vb$(nv),no$(nn),rn$(nr),ob$(no,1),ob(no)
  5. 30 fori=1tonr:forj=1to6:readmp(i,j):nextj,i:fori=1tonv:readvb$(i):next
  6. 40 fori=1tonn:readno$(i):next:fori=1tonr:readrn$(i):next
  7. 50 fori=1tono:readob$(i,0):readob$(i,1):readob(i):next
  8. 60 mp(1,7)=1:printchr$(18)"[159]"rn$(rm):gosub870:goto930
  9. 70 ifint(rnd(0)*100)+1<5then930
  10. 80 ifm=14andob(5)>0then1010
  11. 90 ifm=14andob(5)=0thengosub1430
  12. 100 print"[155][215]hat now? [154]";:limit=28:gosub50000:am$=w$:print"[153]":iflen(am$)>20then70
  13. 110 fori=1tolen(am$):ifmid$(am$,i,1)=" "thengosub7000
  14. 112 next
  15. 115 fori=1tolen(am$):ifmid$(am$,i,1)<>" "thennext:w1$=am$:w2$="":goto130
  16. 120 rem moved to 7000
  17. 130 fori=1tonv
  18. 135 ifvb$(i)<>left$(w1$,3)thennext:print"[201] don't know "w1$:goto70
  19. 140 w1=i:ifw2$=""thenw2=0:goto180
  20. 150 fori=1tonn:ifno$(i)=left$(w2$,3)thenw2=i:goto180
  21. 160 next:fori=1tono:ifleft$(w2$,3)=ob$(i,0)thenw2=i:goto180
  22. 170 next:print"[201] don't know "w2$:goto70
  23. 180 m=m+1:ifw1<10then1060
  24. 190 ifw1>13andw1<17andw2=0thenprintchr$(18)rn$(rm):gosub870:goto70
  25. 200 ifw1=18thenprintm"moves.":print:goto70
  26. 210 ifw1<14andw1>9then760
  27. 220 ifw1=19orw1=20then830
  28. 230 am=0:if(w1=15orw1=16)andw2=2andob(2)=0thenam=1
  29. 240 ifam=1thena$="[213]idsd!@sd!uisdd!ctuunor!uid!bnmns!ng":gosub1190
  30. 250 ifam=1thena$="@!us@gghb!mhfiu!hlcdeede!ho!uid!rhed/":gosub1190:goto70
  31. 260 if(w1=15orw1=16)andw2=2thenprint"[196]on't have it!":goto70
  32. 270 ifw1=17andw2=9andrm<>3andrm<>5thenprint"[196]on't need to!":goto70
  33. 280 ifw1=17andw2=9and(oi=8oroi=rm)thenprint"[196]on't need to!":goto70
  34. 290 ifw1=17andw2=9thenoi=oi+rm:print"[207][203].":goto70
  35. 300 ifw1=21andw2>9andw2<14andob(2)>0thenprint"[217]ou don't have it!":goto70
  36. 310 ifw1=21andw2=10thenprint"[217]ou have to specify a color.":goto70
  37. 320 ifw1=21andw2=11thenprint"[194]oom!!!!":print"[217]ou made a mistake!":goto1400
  38. 330 ifw1=21andw2=13andbu>0thenprint"[194]oom!!!!":print"[207]ops!":goto1400
  39. 340 ifw1=21andw2=13andbu=0thenbu=1:print"[195][204][201][195][203].":goto70
  40. 350 ifw1=21andw2=12andbu<>1thenprint"[194]oom!!!!":print"[207]oops!":goto1400
  41. 360 ifw1=21andw2=12andbu=1thenprint"[212]he box opens and [201] now have a key."
  42. 370 ifw1=21andw2=12andbu=1thenbu=2:ob(4)=0:goto70
  43. 380 ifw1=22andw2=9andrm<>5thenprint"[195]an't do that yet!":goto70
  44. 390 ifw1=22andw2=9andrm=5andob(4)=0thenprint"[207]k.":mp(5,2)=6:goto70
  45. 400 ifw1=22andw2=9thenprint"[195]an't do that yet!":goto70
  46. 410 print"[201] don't understand you.":m=m-1:goto70
  47. 420 a$="[216]nt!@sd!ho!@!m@sfd!bntsux@se!vhui":gosub1190
  48. 430 a$="@!ehm@qhe@ude!ride!ho!uid!bnsods/":gosub1190
  49. 440 a$="[213]id!rntui!defd!hr!mhode!cx!@o!nme":gosub1190
  50. 450 a$="runod!v@mm!vhui!@!qnsubtmmhr!ho!uid":gosub1190
  51. 455 a$="lheemd/":gosub1190
  52. 460 return
  53. 470 a$="[213]idsd!hr!@!lnorusntr!f@ud!rdu!ho!uid":gosub1190
  54. 480 a$="onsui!v@mm/!![213]n!uid!rntui!hr!uid":gosub1190
  55. 490 a$="bntsux@se!@oe!un!uid!d@ru!hr!@!rl@mm":gosub1190
  56. 495 a$="intrd/":gosub1190
  57. 500 return
  58. 510 a$="[213]ihr!hr!uid!d@ru!bntsux@se/![192]!rl@mm":gosub1190
  59. 520 a$="f@q!dyhrur!ho!uid!rntui!v@mm!ng!uid":gosub1190
  60. 530 a$="b@rumd/!![192]!enlhoddshof!unvds!ru@oer":gosub1190
  61. 540 a$="rhmintduude!@f@horu!uid!rjx-!uid":gosub1190
  62. 550 a$="dous@obd!ng!vihbi!hr!bnwdsde!ho!whodr/":gosub1190:return
  63. 560 a$="[216]nt!ru@oe!ho!@!rl@mm!f@q!ho!uid!v@mm":gosub1190
  64. 570 a$="ng!vihbi!uid!nomx!dyhu!hr!onsui/":gosub1190:return
  65. 580 a$="[213]ihr!hr!uid!vdru!bntsux@se/![213]id!ru@cmdr":gosub1190
  66. 590 a$="@sd!un!uid!rntui-!@oe!@!enlhoddshof":gosub1190
  67. 600 a$="unvds!ru@oer!rhmintduude!@f@horu!uid":gosub1190
  68. 610 a$="rjx-!uid!dous@obd!ng!vihbi!hr!bnwdsde":gosub1190
  69. 615 a$="ho!whodr/":gosub1190
  70. 620 return
  71. 630 a$="[216]nt!ru@oe!ho!uid!ru@cmdr-!vihbi!i@wd":gosub1190
  72. 640 a$="@qq@sdoumx!onu!cddo!jdqu!wdsx!bmddo/":gosub1190:return
  73. 650 a$="[213]idsd!@sd!w@shntr!unnmr!@oe!nuids":gosub1190
  74. 660 a$="hudlr!ng!on!ns!rnld!houdsdru!ho!uid":gosub1190
  75. 670 a$="unnm!ride/![213]id!dous@obd!hr!onsui/":gosub1190:return
  76. 680 a$="[213]ihr!hr!uid!cnuunl!gmnns!ng!nod!ng":gosub1190
  77. 690 a$="uid!l@ox!unvdsr!ho!uihr!b@rumd/![192]o":gosub1190
  78. 700 a$="dyhu!hr!rntui!ng!idsd/":gosub1190:return
  79. 710 a$="[213]id!doemdrr!gmnnsr!@mm!@qqd@s!uid":gosub1190:mp(rm,7)=0
  80. 720 a$="r@ld!ho!uihr!unvds/![212]q!ns!envo>":gosub1190:return
  81. 730 a$="[213]ihr!hr!@!rl@mm!ft@se&r!ri@bj/":gosub1190
  82. 740 a$="[215]@shntr!dwdsxe@x!hudlr!@sd!no!uid":gosub1190
  83. 750 a$="gmnns/":gosub1190:return
  84. 760 ifw2=0thenprint"[215][200][193][212]?":goto70
  85. 770 ifw2=14thenw2=7:w2$="magnet"
  86. 780 fori=1tono:ifleft$(w2$,3)=ob$(i,0)and(rm=ob(i)or(w1=12orw1=13))then810
  87. 790 next:ifw1=12orw1=13thenprint"[196]on't have it.":goto70
  88. 800 print"[196]on't see it.":goto70
  89. 810 ifw1=10orw1=11thenob(i)=0:printob$(i,1)" is taken":goto70
  90. 820 ob(i)=rm:printob$(i,1)" is dropped":goto70
  91. 830 print"[217]ou are carrying:"
  92. 840 am=0:fori=1tono:ifob(i)=0thenam=1:printob$(i,1)
  93. 850 next:ifam=0thenprint"[206][207][212][200][201][206][199]!"
  94. 860 goto70
  95. 870 onrmgosub420,470,510,560,580,630,650,680,710,730
  96. 880 am=0:fori=1tono:ifrm=ob(i)andam=0thenam=1:print"[217]ou see ";
  97. 890 ifrm=ob(i)thenprintob$(i,1)", ";
  98. 900 next:ifam>0thenprint"[157][157]."
  99. 910 return
  100. 920 print"[201] don't understand you":m=m-1:goto70
  101. 930 a$="[214]ihmru!fnhof!@cntu!xnts!ctrhodrr":gosub1190
  102. 940 a$="@!lnsd!ui@o!rmhfiumx!eds@ofde":gosub1190
  103. 950 a$="@qq@shuhno!@qqd@sr/![201]d!rddlr!un!cd":gosub1190
  104. 960 a$="rbsd@lhof!rnld!onordord!@cntu!on":gosub1190
  105. 970 a$="drb@qd/![213]id!finru!wdsx!hlqnmhudmx":gosub1190
  106. 980 a$="m@tfir!ho!xnts!g@bd-!uido!w@ohridr!un":gosub1190
  107. 990 a$="vi@udwds!torhfiumx!qm@bd!id!@qqd@sde":gosub1190
  108. 995 a$="gsnl/":gosub1190
  109. 1000 goto80
  110. 1010 a$="[216]nt!pthud!rteedomx!@sd!houdsstqude!cx":gosub1190
  111. 1020 a$="@o!nwdsqnvdshof!w@lqhsd/![214]ihmd":gosub1190
  112. 1030 a$="rustffmhof!gns!xnts!mhgd!id!b@mlmx":gosub1190
  113. 1040 a$="eshojr!xnts!cmnne/![216]nt!i@wd!ehde/":gosub1190
  114. 1050 goto1400
  115. 1060 ifw1>6andw1<10andw2=7and(rm=5orrm=3)and(oi=rmoroi=8)thenrm=8:goto1170
  116. 1070 if(w1<7or(w1>6andw1<10andw2=1))andrm=2andob(6)=0andob(7)=0then1490
  117. 1080 ifw1<7or(w1>6andw1<10andw2<7)then1120
  118. 1090 ifw2=8thenrm=7:printchr$(18)"[159]"rn$(rm):goto1170
  119. 1100 ifw1>6andw1<10andw2=7thenprint"[212]he door is stuck!":goto70
  120. 1110 print"[196]o what?":goto70
  121. 1120 ifw1<7thenw2=w1
  122. 1130 ifrm=5andw2=2andmp(rm,w2)=0thenprint"[195]an't [212]he door's locked.":goto70
  123. 1140 ifrm=2andw2=1and(ob(6)>0orob(7)>0)then1470
  124. 1150 ifmp(rm,w2)=0thenprint"[211]omething solid hits you in the face.":goto70
  125. 1160 rm=mp(rm,w2):printchr$(18)"[159]"rn$(rm)
  126. 1170 ifmp(rm,7)=0thenmp(rm,7)=1:gosub870:goto70
  127. 1180 goto70
  128. 1190 z=1:w=len(a$):y=.5:a=-1:fori=ztow:j=asc(mid$(a$,i,z)):x=j*y
  129. 1195 ifx=int(x)thenprintchr$(j-a);:next:print:return
  130. 1200 printchr$(j+a);:next:print:return
  131. 1210 rem map
  132. 1220 data 2,0,3,5,0,0
  133. 1230 data 0,1,10,0,0,0
  134. 1240 data 0,4,0,1,0,0
  135. 1250 data 3,0,0,0,0,0
  136. 1260 data 0,0,1,0,0,0
  137. 1270 data 5,0,0,0,0,0
  138. 1280 data 1,0,0,0,0,0
  139. 1290 data 0,5,0,0,9,0
  140. 1300 data 0,0,0,0,9,8
  141. 1310 data 0,0,0,2,0,0
  142. 1320 data n,s,e,w,u,d,go,ent,wal
  143. 1330 data tak,get,dro,lea,l,loo,exa,oil,tim,i,inv,pus,unl
  144. 1340 data nor,sou,eas,wes,up,dow,tow,she,doo,but,red,yel,gre,ele
  145. 1350 data "[195]ourtyard","[194]y the gates","[197]. courtyard","[199]ap in wall"
  146. 1360 data"[215]. courtyard","[211]tables","[212]ool shed"
  147. 1365 data"[212]ower","[212]ower","[199]uard quarters"
  148. 1370 data can,"an oil can",7,box,"a black box",10,sho,"an old shovel",7
  149. 1380 data key,"a key",11,gar,"a garlic bloom",6
  150. 1390 data bat,"a car battery",8,mag,"an electromagnet",4
  151. 1400 print:print"[208]lay again ([217]/[206])":poke198,0:wait198,1:geta$
  152. 1410 ifa$<>"n"thenrun
  153. 1420 print"[194]etter luck next time!":fori=1to1000:next:goto60000
  154. 1430 a$="[216]nt!pthud!rteedomx!@sd!houdsstqude!cx":gosub1190
  155. 1440 a$="@o!nwdsqnvdshof!w@lqhsd/![201]d!u@jdr!nod":gosub1190
  156. 1450 a$="rohgg!ng!xnts!f@smhb-!ruhbjr!tq!ihr":gosub1190
  157. 1460 a$="onrd!@oe!uido!gmhdr!@v@x/":gosub1190:return
  158. 1470 a$="[192]!finrumx!johfiu!ho!@!gtmm!rthu!ng":gosub1190
  159. 1480 a$="@slns!sdgtrdr!un!mdu!xnt!q@rr/":gosub1190:goto70
  160. 1490 a$="[213]id!finrumx!ft@se!hr!@qq@sdoumx!rb@sde":gosub1190
  161. 1500 a$="ng!uid!l@fodu!@oe!sdgtrdr!un!bnld!od@s":gosub1190
  162. 1510 a$="xnt/![216]nt!wdsx!b@rt@mmx!rusnmm!ntu!ng":gosub1190
  163. 1520 a$="uid!b@rumd